<%@ page import="java.util.*" %> <%@ page import="java.text.*" %> <html> <head> <title>Date and Time</title> </head> <body> <center> <h1>The date and time is now:<br /> <%= DateFormat.getDateInstance().format(new Date()) %><br /> <%= DateFormat.getTimeInstance().format(new Date()) %></h1> </center> </body> </html>